package com.peach.mapper;

import com.peach.pojo.User;
import com.peach.pojo.UserBranch;
import com.peach.pojo.UserStage;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper {
    List<User> selectAllUsersByConditions(@Param("userId") Integer userId,
                                         @Param("userName") String userName,
                                         @Param("userClass") String userClass,
                                         @Param("userBranchId") Integer userBranchId,
                                         @Param("userStageId") Integer userStageId);
    List<User> selectAllUsers();
    Boolean insertOneUser(User user);
    Boolean updateOneUser(User user);
    Boolean deleteOneUser(Integer userId);

    User selectUsersById(Integer userId);
    List<User> selectUsersByBranch(Integer userBranchId);
    List<User> selectUsersByStage(Integer userStageId);


    List<UserBranch>selectAllUserBranches();
    List<UserStage> selectAllUserStages();

    User selectOneUser(Integer userId);

}
